﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<%-- <c:if test="${currentPrincipal.administrator}">
	<ul class="nav navbar-nav ihg-navbar-nav" style="margin-left: 165px;">
	  <li class="${menuContext.shouldHighlight('menu-assessment-setting') ? 'active' : ''}"><a href="${ctx.host}/assessors">System Settings</a></li>
  	  <li class="${menuContext.shouldHighlight('menu-assessment-setting') ? 'active' : ''}"><a href="${ctx.host}/sessions">Sessions</a></li>
  	  <li class="${menuContext.shouldHighlight('menu-assessment-setting') ? 'active' : ''}"><a href="${ctx.host}/sessions">Profile</a></li>
	</ul>
</c:if>
 --%>
<%-- <ul class="navbar-nav ihg-navbar-nav">
  <c:forEach var="menu" items="${secure.menus}">
      <c:if test="${currentPrincipal.hasResource('menus', menu.id)}">
          <c:if test="${menuContext.shouldHighlight(menu.id)}">
            <c:set value="${menu.id}" var="activeMenu" scope="request" />
          </c:if>
          <li ${menuContext.shouldHighlight(menu.id) ? 'class="active"' : ''}>
            <a href="${ctx.host}/${menu.url}">${menu.name}</a>
          </li>
      </c:if>
  </c:forEach> 
</ul> --%>

<ul class="nav navbar-nav ihg-navbar-nav" style="margin-left: 165px;">
  <c:forEach var="menu" items="${secure.menus}">
      <c:if test="${currentPrincipal.hasResource('menus', menu.id)}">
          <c:if test="${menuContext.shouldHighlight(menu.id)}"><c:set value="${menu.id}" var="activeMenu" scope="request" /> </c:if>
          <li ${menuContext.shouldHighlight(menu.id) ? 'class="active"' : ''}><a href="${ctx.host}/${menu.url}">${menu.name}</a></li>
      </c:if>
  </c:forEach> 
</ul>
